//
//  Extension+UILabel.swift
//  CZ29VVeibo
//
//  Created by apple on 16/6/27.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

extension UILabel {
    convenience init(textColor: UIColor, textFont: CGFloat = 14, maxWidth:CGFloat = 0){
        self.init()
        
        //字体颜色
        self.textColor = textColor
        //字体大小
        self.font = UIFont.systemFontOfSize(textFont)
        //设置文本的最大宽度
        if maxWidth > 0 {
            self.preferredMaxLayoutWidth = maxWidth
            self.numberOfLines = 0
        }
    }
}
